home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
commercial
/
inovatronics
/
edgedemo
/
edgeeditor
/
rexx
/
menu_learntokey.edge
< prev
next >
Wrap
Text File
|
1994-11-17
|
980b
|
48 lines
/*
** $VER: Menu_LearnToKey.edge 1.1 (19:37:28, 29 Sep 1993)
**
** Learn and bind a macro to a key
**
** Written by Thomas liljetoft & Eddie Churchill
*/
options results
/* get the users error-report level */
getenvvar _ge_errlevel
errlevel = result
/* ask for a key-description to use */
'requestkey' title '"Enter key for the macro."'
if RC == 0 then do
/* ok so far, now what is the filename to use */
key = result
parse var key 'KEY="' keycode '" Q="' qualcode '" QM="' maskcode '"' foo
name = translate(qualcode,'_',' ')'_'keycode'.edge'
name = 'ram:'strip(reverse(substr(reverse(name),1,30)),L)
/* now add the key */
'keyboard' key '"'name'"'
/* is all well */
if RC == 0 then do
/* start recording into the file */
'learn filename "'name'"'
end
end
if RC >= errlevel then do
/* something went wrong enought to be reported so report */
'fault'
'requestnotify' result
end
exit(0)